<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="css/novelmain.css" />
    <link rel="stylesheet" href="css/jquery.zySlide.css">
    <link rel="icon" href="img/title.ico" type="img/x-ico" />
    <title>校园原创</title>
</head>
<script src="/demos/googlegg.js"></script>
<style>
    .zy-Slide section {
        color: black;
        border-width: 1px;
        border-style: solid;
    }
</style>
<style>

</style>

<body>
    <!--顶部菜单区域-->
    <div class="menutop">
        <ul class="menuul one">
            <li><a href="#">全部作品</a></li>
            <li><a href="#">排行</a></li>
            <li><a href="#">完本</a></li>
            <li>
                <a href="#"><span style="padding-right:5px"><img src="img/zuozhe.ico"></span>作家专区</a>
            </li>
        </ul>
        <ul class="menuul two">
        	<c:if test="${loginuser==null }">
	            <li><a href="login.jsp">登录</a>|</li>
	            <li><a href="addnormaluser.jsp">注册</a></li>
	        </c:if>
	        <c:if test="${loginuser!=null }">
	        	<li>${loginuser.userid}</li>
	        	<li><a href="loginout.do">退出登录</a></li>
	        </c:if>
	        <c:if test="${loginuser==null}">
	            <li>
	                <a href="login.jsp"><span style="padding-right:5px"><img src="img/books.ico"></span>我的书架</a>
	            </li>
            </c:if>
            <c:if test="${loginuser!=null}">
	            <li>
	                <a href="mybooksroom.jsp?userid=${loginuser.userid}"><span style="padding-right:5px"><img src="img/books.ico"></span>我的书架</a>
	            </li>
            </c:if>
            <li><a href="#">联系客服</a></li>
        </ul>
    </div>
    <!--查询区域-->
    <div class="logodiv">
        <div>
            <div class="logobar"><img src="img/logo.png"></div>
            <div class="searchbar">
                <form id="hform" name="hform" action="#">
                    <input type="text" class="searchbox" name="searchbox" placeholder="作者/书籍">
                    <span><input type="submit" class="searchbtn" value="搜索"></span>
                </form>
            </div>
            <c:if test="${loginuser==null || (loginuser!=null && loginuser.usertype!=2) }">
		        <div class="guide">
		            <a href="#"><span style="padding-right:5px"><img src="img/xiezuo.ico"></span>我要当作家</a>
		        </div>
	        </c:if>
	        <c:if test="${loginuser!=null && loginuser.usertype==2 }">
	        <div class="guide">
	            <a href="#"><span style="padding-right:5px"><img src="img/xiezuo.ico"></span>我要写作</a>
	        </div>
	        </c:if>
        </div>
        <div class="imgtop"><img src="img/headertop.jpg"></div>
    </div>
    <hr>
    <!--分类及轮播区域-->
    <div class="classifydiv">
        <!--分类区域-->
        <div class="classify">
            <div style="margin-bottom:5px ">
                <strong class="underline">作品分类</strong>
            </div>
            <table style="margin: auto">
                <tr>
                    <td><a href="#">玄幻</a></td>
                    <td>
                        <a href="#">仙侠</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="#">奇幻</a>
                    </td>
                    <td>
                        <a href="#">武侠</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="#">都市</a>
                    </td>
                    <td>
                        <a href="#">历史</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="#">军事</a>
                    </td>
                    <td>
                        <a href="#">科幻</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="#">灵异</a>
                    </td>
                    <td>
                        <a href="#">体育</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="#">言情</a>
                    </td>
                    <td>
                        <a href="#">现实</a>
                    </td>
                </tr>
            </table>
        </div>
        <!--轮播区域-->
        <div class="recommend">
            <div style="margin-bottom:5px"><strong class="underline">热门推荐</strong></div>
            <div id="Slide1" class="zy-Slide">
                <!--prev:元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体。-->
                <section><</section>
                <section>></section>
                <ul>
                    <!--alt + shift : 可以创建一个矩形选择区域-->
                    <c:forEach items="${hotlist }" var="obj" begin="0" end="6" step="1">
                    	<li><a href="novel.do?novelid=${obj.novelid}"><img src="../upload/${obj.photourl}" /></a></li>
                    </c:forEach>
                </ul>
            </div>
        </div>
    </div>
    <hr>
    <!--分类及轮播区域结束-->
    <!--小说封推区域-->
    <div class="textmain">
        <div style="margin-bottom:5px "><strong class="underline" style="margin-left: -65%;margin-top: 10px;">封面推荐</strong></div>
        <div class="content">
        	<c:forEach items="${novellist}" var="obj">
	            <div class="boxnovel">
	                <div class="novelimg">
	                    <a href="novel.do?novelid=${obj.novelid}"><img src="../upload/${obj.photourl}"></a>
	                </div>
	                <div class="novelname"><a href="novel.do?novelid=${obj.novelid}">${obj.novelname}</a></div>
	                <div class="novelauthor"><a href="authormain.do?authorname=${obj.nickname}" style="color:gray">${obj.nickname}</a></div>
	            </div>
            </c:forEach>
        </div>
    </div>
    <!--最近更新小说区域-->
    <div class="recentnoveldiv">
        <div style="margin-bottom:5px "><strong class="underline" style="margin-left: -65%;margin-top: 10px;">最近更新</strong></div>
        <div class="recentnovel">
            <table style="margin:auto">
            	<c:forEach items="${recentlist}" var="obj">
	                <tr>
	                    <td class="recentcolor"><a href="#">[${obj.typename}]</a></td>
	                    <td><a href="novel.do?novelid=${obj.novelid}">《${obj.novelname}》</a></td>
	                    <td><a href="novelchap.do?chapterid=${obj.chapterid}">${obj.chaptername}</a></td>
	                    <td><a href="authormain.do?authorname=${obj.nickname}">${obj.nickname}</a></td>
	                    <td class="recentcolor">${obj.createtime}</td>
	                </tr>
                </c:forEach>
            </table>
        </div>
    </div>
    <!--底部-->
    <div class="footer">
        <div class="morenovelsweb">
            <a href="https://www.qidian.com/">起点小说网</a>|
            <a href="http://www.xxsy.net/">潇湘书院</a>|
            <a href="http://chuangshi.qq.com/">创世中文网</a>|
            <a href="https://www.readnovel.com/">小说阅读网</a>|
            <a href="https://www.xs8.cn/">言情小说吧</a>
        </div>
        <div class="morenovelsweb">
            <a href="#">关于本站</a>
            <a href="#">联系我们</a>
            <a href="#">帮助中心</a>
            <a href="#">提交建议</a>
        </div>
        <div>
            <span>Copyright © 2019 Software Technology from  <a href="http://www.yngsxy.net/">云南工商学院</a></span>
        </div>
    </div>
</body>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.zySlide.js"></script>
<script src="js/index.js"></script>

</html>